<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=10.0, user-scalable=yes">
<link rel="stylesheet" href="/fuman/css/style.default.css" type="text/css" />
<script type="text/javascript" src="/fuman/js/plugins/jquery-1.7.min.js"></script>
<script type="text/javascript" src="/fuman/js/plugins/jquery-ui-1.8.16.custom.min.js"></script>
<!--<script type="text/javascript" src="/fuman/js/plugins/jquery.cookie.js"></script>-->
<!--<script type="text/javascript" src="/fuman/js/plugins/jquery.dataTables.min.js"></script>-->
<!--<script type="text/javascript" src="/fuman/js/plugins/jquery.uniform.min.js"></script>-->
<script type="text/javascript" src="/fuman/js/custom/general.js"></script>
<script type="text/javascript" src="/fuman/js/DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/fuman/js/plugins/jquery.validate.min.js"></script>
<script type="text/javascript" src="/fuman/js/pubilc.js"></script>
<script type="text/javascript" src="/fuman/js/form/aws_admin.js" ></script>
<script type="text/javascript" src="/fuman/js/form/framework.js" ></script>
<script type="text/javascript" src="/fuman/js/plugins/jquery.jgrowl.js"></script>

<script type="text/javascript" src="/fuman/js/plugins/jquery.uniform.min.js"></script>
<script type="text/javascript" src="/fuman/js/plugins/jquery.flot.min.js"></script>
<script type="text/javascript" src="/fuman/js/plugins/jquery.flot.resize.min.js"></script>
<script type="text/javascript" src="/fuman/js/plugins/jquery.slimscroll.js"></script>
<script language="javascript">
jQuery(document).ready(function(){
		jQuery('#overviewselect, input:checkbox').uniform();
		
		///// DATE PICKER /////
		jQuery( "#datepickfrom, #datepickto" ).datepicker();
		
		///// SLIM SCROLL /////
		jQuery('#scroll1').slimscroll({
			color: '#666',
			size: '10px',
			width: 'auto',
			height: '175px'                  
		});
		
		///// ACCORDION /////
		jQuery('#accordion').accordion({autoHeight:  false});
	
		///// SIMPLE CHART /////
		var flash = {{$vlues2}};
		var html5 = {{$vlues}};//x轴自定义刻度数据  	
		function showTooltip(x, y, contents) {
			jQuery('<div id="tooltip" class="tooltipflot">' + contents + '</div>').css( {
				position: 'absolute',
				display: 'none',
				top: y + 5,
				left: x + 5
			}).appendTo("body").fadeIn(200);
		}
	
			
		var plot = jQuery.plot(jQuery("#chartplace"),
			   [ { data: flash, label: "去年收入", color: "#069"}, { data: html5, label: "今年收入", color: "#FF6600"} ], {
				   series: {
					   lines: { show: true, fill: true, fillColor: { colors: [ { opacity: 0.05 }, { opacity: 0.15 } ] } },
					   points: { show: true }
				   },
				   legend: { position: 'nw'},
				   grid: { hoverable: true, clickable: true, borderColor: '#ccc', borderWidth: 1, labelMargin: 10 },
				   yaxis: { min: 0, max: {{$maxtop}} },
				   xaxis: {
						ticks:{{$ticks}},
							
						}
				 });
		
		var previousPoint = null;
		jQuery("#chartplace").bind("plothover", function (event, pos, item) {
			jQuery("#x").text(pos.x.toFixed(2));
			jQuery("#y").text(pos.y.toFixed(2));
			if(item) {
				if (previousPoint != item.dataIndex) {
					previousPoint = item.dataIndex;
						
					jQuery("#tooltip").remove();
					var x = item.datapoint[0].toFixed(0)+"号",
					y = item.datapoint[1].toFixed(0)+"元";
						
					showTooltip(item.pageX, item.pageY,
									item.series.label + " of " + x + " = " + y);
				}
			
			} else {
			   jQuery("#tooltip").remove();
			   previousPoint = null;            
			}
		
		});
		
		jQuery("#chartplace").bind("plotclick", function (event, pos, item) {
			if (item) {
				jQuery("#clickdata").text("You clicked point " + item.dataIndex + " in " + item.series.label + ".");
				plot.highlight(item.series, item.datapoint);
			}
		});
		
		
	///// SWITCHING LIST FROM 3 COLUMNS TO 2 COLUMN LIST /////
	function rearrangeShortcuts() {
		if(jQuery(window).width() < 430) {
			if(jQuery('.shortcuts li.one_half').length == 0) {
				var count = 0;
				jQuery('.shortcuts li').removeAttr('class');
				jQuery('.shortcuts li').each(function(){
					jQuery(this).addClass('one_half');
					if(count%2 != 0) jQuery(this).addClass('last');
					count++;
				});	
			}
		} else {
			if(jQuery('.shortcuts li.one_half').length > 0) {
				jQuery('.shortcuts li').removeAttr('class');
			}
		}
	}
	
	rearrangeShortcuts();
	
	///// ON RESIZE WINDOW /////
	jQuery(window).resize(function(){
		rearrangeShortcuts();
	});


});
</script>
</head>

<body class="withvernav">
 {{if $order.alltotal.allorderNum}}
        <br clear="all" />
        <div class="contenttitle2 nomargintop">
            <h3>店铺当月报表</h3>
        </div><!--contenttitle-->
        
        <div class="overviewhead">
            <div class="overviewselect">
             
            </div><!--floatright-->
            时间: &nbsp;{{$order.starttime}}  To: {{$order.endtime}} 
            {{if $order.shopname}} 店铺:{{$order.shopname}} {{/if}}  
            
           &nbsp;&nbsp;&nbsp; <a href="/WalmartShop/diffSalesCount?starttime={{$lasttime}}&endtime={{$lasttime}}" target="_blank"><font color="#0000FF">去年同期对比</font></a>
        </div><!--overviewhead-->
        
        <br clear="all" />
        
        <table cellpadding="0" cellspacing="0" border="0" class="stdtable overviewtable">
            <colgroup>
                <col class="con0" width="20%" />
                <col class="con1" width="20%" />
                <col class="con0" width="20%" />
                <col class="con1" width="20%" />
                <col class="con0" width="20%" />
            </colgroup>
            <thead>
                <tr>
                    <th class="head0">订单数</th>
                    <th class="head1">实收金额</th>
                    <th class="head0">预计成本</th>
                    <th class="head1">预估毛利</th>
                    <th class="head0">利润率</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>{{$order.alltotal.allorderNum}}</td>
                    <td>{{$order.alltotal.allsubtotal}}</td>
                    <td>{{$order.alltotal.allsubzhic}}</td>
                    <td class="center">{{$order.alltotal.alllirun}}</td>
                    <td class="center">{{$order.alltotal.allmaolv}}%</td>
                </tr>
            </tbody>
        </table>
        <br clear="all" />
        <div id="chartplace" style="height:300px;"></div>
        {{/if}}
</body>
</html>
